package com.five.fallback;


import com.five.api.ReaderServiceAPI;
import com.five.dto.IdRequest;
import com.five.pojo.Comment;
import com.five.pojo.Reader;
import com.five.result.Result;
import org.springframework.cloud.openfeign.FallbackFactory;

import java.util.List;
import java.util.Set;

public class ReaderFallback implements FallbackFactory<ReaderServiceAPI> {
    @Override
    public ReaderServiceAPI create(Throwable cause) {
        return new ReaderServiceAPI() {

            @Override
            public Result queryByPhone(String phone) {
                return null;
            }

            @Override
            public Result queryByEmail(String email) {
                return null;
            }

            @Override
            public Result queryByLoginInfoId(Long loginInfoId) {
                return null;
            }

            @Override
            public Result insertReader(Reader reader) {
                return null;
            }

            @Override
            public Result updateReader(Reader reader) {
                return null;
            }


            @Override
            public Result<Reader> queryByAccount(String account) {
                return null;
            }

            @Override
            public Result<Void> addCollect(String token, Long novelId) {
                return null;
            }

            @Override
            public Result<Void> cancelCollect(String token, Long novelId) {
                return null;
            }

            @Override
            public Result<Set<Long>> getReaderCollectNovelIds(String token) {
                return null;
            }

            @Override
            public Result<List<Comment>> getBooksWithComments(IdRequest request) {
                return null;
            }

            @Override
            public Result<Void> updateReplyCount(IdRequest request) {
                return null;
            }

        };
    }
}